package com.ce.common.db.base;

/**
 * 构造一个数据库对象
 * 
 * @author yangenxiong
 * 
 */
public class Database {

	//用户名
	private String user;

	//密码
	private String pass;

	//数据库名字
	private String databaseName;
	
	//数据库地址
	private String host;
	
	private String characterSet;

	public Database(String user, String pass, String databaseName, String host, 
			String characterSet) {
		super();
		this.user = user;
		this.pass = pass;
		this.databaseName = databaseName;
		this.host = host;
		this.characterSet = characterSet;
	}

	public String getDatabaseName() {
		return databaseName;
	}

	public void setDatabaseName(String databaseName) {
		this.databaseName = databaseName;
	}

	public String getPass() {
		return pass;
	}

	public void setPass(String pass) {
		this.pass = pass;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}
	
	public String getCharacterSet() {
		return characterSet;
	}

	public void setCharacterSet(String characterSet) {
		this.characterSet = characterSet;
	}

	public boolean isNull() {
		if (this.user == null || pass == null || databaseName == null || host == null) {
			return true;
		}
		return false;
	}
	
}
